<?php
/**
 * Created by PhpStorm.
 * User: xiant_000
 * Date: 2018/11/11
 * Time: 22:40
 */

$content = date('Y-m-d H:i:s') . PHP_EOL;
swoole_async_writefile(__DIR__ . '/1.log', $content, function ($fileName) {
    // todo
    echo 'success' . PHP_EOL;
}, FILE_APPEND);

echo 'start' . PHP_EOL;